
<?php echo $header; ?>
<div class="container">   
	<div class="content">
    	<div class="bodyLeft">
        	<?php echo $column_left; ?>
        </div><!-- end body left -->
        <div class="bodyRight">
        	 <?php require_once("catalog/view/theme/fritids/template/slideshow/slider.php"); ?>
            <div class="body-content">
            	<div class="heading">
                    <h2><?php echo $heading_title; ?></h2>
                    <img src="catalog/view/theme/fritids/src/images/imgTemp1.png" class="imgTemp">
                    <div class="clear"></div>
                </div>              
                <div class="advance-search">
                                  Search criteria - text sample over here:               	
                        	<div class="adv-search-container">
                             <?php if (isset($products)) { ?>
					<div id="product-list">					
						  <?php for ($i = 0; $i < sizeof($products); $i = $i + 4) { ?>    
						  <?php for ($j = $i; $j < ($i + 4); $j++) { ?>
						  <?php if (isset($products[$j])) { ?>
                    <ul>		
                        <li class="product-list-eachProduct">
                            <a class="product-list-image" href="<?php echo $products[$j]['href'];?>"><img src="<?php echo $products[$j]['thumb'];?>" title="<?php echo $products[$j]['name'];?>" alt="<?php echo $products[$j]['name'];?>" /></a>
                            <div class="product-list-info">
                                <a class="product-list-name" href="<?php echo $products[$j]['href']; ?>" ><?php echo $products[$j]['name']; ?></a>
								<?php if ($display_price) { ?>      
								<?php if (!$products[$j]['special']) { ?>								
							   <p>Pris:<span>DKK </span><span class="product-list-price"><?php echo $products[$j]['price']; ?></span></p>                           
								<?php } else { ?>
								<span class="product-list-price"><?php echo $products[$j]['price']; ?></span></br><span class="product-list-price"><?php echo $products[$j]['special']; ?> </span>
								<?php } ?>  					
							</div>
                          <a class="product-list-buy" href="<?php echo $products[$j]['href']; ?>" title="<?php echo $button_add_to_cart; ?>">Buy</a>
								<?php } ?>
					    </li>
					</ul>
						  <?php } ?>
						  <?php } ?>
						  <?php } ?>
						  <?php } else { ?>		
						  				  
						  <br><h1>  <?php echo $text_empty; ?></h1>
						  
						  <div id="payment-bottom">
                            	<a href="javascript:history.back()" id="payment-back">Back</a>                              
                            </div>
						  <?php } ?>
						<div class="clear"></div>		
					</div>		 	
    
                               
                            </div>
            </div>
          </div>	 
		</div>	
	</div>      
</div>
<script type="text/javascript"><!--
$('#content_search input').keydown(function(e) {
	if (e.keyCode == 13) {
		contentSearch();
	}
});

function contentSearch() {
	url = 'index.php?route=product/search';
	
	var keyword = $('#keyword').attr('value');
	
	if (keyword) {
		url += '&keyword=' + encodeURIComponent(keyword);
	}

	var category_id = $('#category_id').attr('value');
	
	if (category_id) {
		url += '&category_id=' + encodeURIComponent(category_id);
	}
	
	if ($('#description').attr('checked')) {
		url += '&description=1';
	}
	
	if ($('#model').attr('checked')) {
		url += '&model=1';
	}

	location = url;
}
//--></script>

<?php echo $footer; ?>



















<?php return?>
<div id="content">    
    </div>
  </div>
  <div class="middle"><b><?php echo $text_critea; ?></b>
    <div id="content_search" style="background: #F7F7F7; border: 1px solid #DDDDDD; padding: 10px; margin-top: 3px; margin-bottom: 10px;">
      <table>
        <tr>
          <td><?php echo $entry_search; ?></td>
          <td><?php if ($keyword) { ?>
            <input type="text" value="<?php echo $keyword; ?>" id="keyword" />
            <?php } else { ?>
            <input type="text" value="<?php echo $text_keyword; ?>" id="keyword" onclick="this.value = '';" onkeydown="this.style.color = '000000'" style="color: #999;" />
            <?php } ?>
            <select id="category_id">
              <option value="0"><?php echo $text_category; ?></option>
              <?php foreach ($categories as $category) { ?>
              <?php if ($category['category_id'] == $category_id) { ?>
              <option value="<?php echo $category['category_id']; ?>" selected="selected"><?php echo $category['name']; ?></option>
              <?php } else { ?>
              <option value="<?php echo $category['category_id']; ?>"><?php echo $category['name']; ?></option>
              <?php } ?>
              <?php } ?>
            </select></td>
        </tr>
        <tr>
          <td colspan="2"><?php if ($description) { ?>
            <input type="checkbox" name="description" id="description" checked="checked" />
            <?php } else { ?>
            <input type="checkbox" name="description" id="description" />
            <?php } ?>
            <?php echo $entry_description; ?></td>
        </tr>
		<tr>
          <td colspan="2"><?php if ($model) { ?>
            <input type="checkbox" name="model" id="model" checked="checked" />
            <?php } else { ?>
            <input type="checkbox" name="model" id="model" />
            <?php } ?>
            <?php echo $entry_model; ?></td>
        </tr>
      </table>
    </div>
    <div class="buttons">
      <table>
        <tr>
          <td align="right"><a onclick="contentSearch();" class="button"><span><?php echo $button_search; ?></span></a></td>
        </tr>
      </table>
    </div>
   
    <?php if (isset($products)) { ?>
   
    <table class="list">
	
	
      <?php for ($i = 0; $i < sizeof($products); $i = $i + 4) { ?>     
        <?php for ($j = $i; $j < ($i + 4); $j++) { ?>
        <td width="25%"><?php if (isset($products[$j])) { ?>
          <a href="<?php echo $products[$j]['href']; ?>"><img src="<?php echo $products[$j]['thumb']; ?>" title="<?php echo $products[$j]['name']; ?>" alt="<?php echo $products[$j]['name']; ?>" /></a><br />
          <a href="<?php echo $products[$j]['href']; ?>"><?php echo $products[$j]['name']; ?></a><br />      
          <?php if ($display_price) { ?>
          <?php if (!$products[$j]['special']) { ?>
          <span style="color: #900; font-weight: bold;"><?php echo $products[$j]['price']; ?></span>
          <?php } else { ?>
          <span style="color: #900; font-weight: bold; text-decoration: line-through;"><?php echo $products[$j]['price']; ?></span> <span style="color: #F00;"><?php echo $products[$j]['special']; ?></span>
          <?php } ?>
		  <a class="button_add_small" href="<?php echo $products[$j]['add']; ?>" title="<?php echo $button_add_to_cart; ?>" >&nbsp;</a>
          <?php } ?>
          <br />
         
          <?php } ?>
		  
        <?php } ?>
      
      <?php } ?>
	  
	  
    </table>
	
	
	
    <div class="pagination"><?php echo $pagination; ?></div>
    <?php } else { ?>
    <div style="background: #F7F7F7; border: 1px solid #DDDDDD; padding: 10px; margin-top: 3px; margin-bottom: 15px;"><?php echo $text_empty; ?></div>
    <?php }?>
  </div>
 
</div>

